<%@page import="java.net.URLEncoder"%>
<%
	String nome = request.getParameter("nome");
	String id = request.getParameter("id");
	boolean userOpenId = request.getParameter("openid") != null;
	boolean twitter = request.getParameter("twitterurl") != null;
	boolean face = request.getParameter("facebook") != null;
	boolean yahoo = request.getParameter("yahoo") != null;
%>
<html>
<head>
</head>
<body style="height: 50px; margin: 0px 5px;">

	<% if (userOpenId) { %>
		<div style="position:relative; top:50%; height:50px; margin-top:-25px; float: left;">
			<img src="/images/anonyuser.jpg" style=" float: left;">
		</div>
	<% } else if (twitter) { %>
		<div style="position:relative; top:50%; height:50px; margin-top:-25px; float: left;">
			<img src="<%=request.getParameter("twitterurl")%>" style=" float: left;">
		</div>
	<% } else if (yahoo) { %>
		<div style="position:relative; top:50%; height:50px; margin-top:-25px; float: left;">
			<!-- 
			<img src="http://www.gravatar.com/avatar/<%=request.getParameter("gravatarhash")%>?s=50&d=<%=URLEncoder.encode("http://" + request.getServerName().replace("localhost", "localhost:8888") + "/images/anonyuser.jpg", "UTF-8")%>" />
			 -->
			 <img src="http://www.gravatar.com/avatar/<%=request.getParameter("gravatarhash")%>?s=50&r=<%=URLEncoder.encode("http://" + request.getServerName().replace("localhost", "localhost:8888") + "/images/anonyuser.jpg", "UTF-8")%>" />
		</div>
	<% } else if (face) { %>
		<div style="position:relative; top:50%; height:50px; margin-top:-25px; float: left;">
			<img src="https://graph.facebook.com/<%=id%>/picture" style=" float: left;">
		</div>
	<% } %>

	<div style="position:relative; top:50%; height:16px; margin-top:-8px; float: left;">
		<div style="color:white; font-size: <%=(nome.length()>25?"14":"16")%>px; font-family: tahoma;">
			<%=nome%>
		</div>
	</div>
</body>
</html>
